// P0847R7
// { dg-do compile { target c++23 } }

// uses of member only operators (call op)

// execution paths for subscript with 1 argument and 0 and 2+ arguments are different
// just to be safe, also test 0 and 2 argument cases here too

struct S {
  void operator()(this S&) {}
  void operator()(this S&, int) {}
  void operator()(this S&, int, int) {}
  template<typename... Args>
  void operator()(this S&, Args... args) {}
};

void non_dep()
{
  S s{};
  s();
  s(0);
  s(0, 0);
  s(0, 0, 0);
}

template<typename = void>
void dependent()
{
  S s{};
  s();
  s(0);
  s(0, 0);
  s(0, 0, 0);
}

void call()
{
  dependent();
}

